package com.orphan.util.mqConfig;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UsersAuditMq {

    @Bean
    public Queue queueUsersAudit(){
        return new Queue("usersAudit");
    }

    @Bean
    public Binding queueUsersAuditToDirectExchange(Queue queueUsersAudit, DirectExchange directExchange){
        return BindingBuilder.bind(queueUsersAudit).to(directExchange).with("UsersAuditReturn");
    }

}
